package com.yangyouli.unity_demo_server.util;

import java.io.InputStream;

import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

public class ConnUtil {
	private static final String RESOURCE_PATH = "mybatisConfig.xml";
	private static final InputStream INPUT_STREAM = ConnUtil.class.getClassLoader().getResourceAsStream(RESOURCE_PATH);
	private static final SqlSessionFactory FACTORY = new SqlSessionFactoryBuilder().build(INPUT_STREAM);
	
	public static SqlSessionFactory getSqlSessionFactory () {
		return FACTORY;
	}
}
